%%%----------------------------------------------------------------------
%%% File    : cus_ejabberd_c2s.erl
%%% Author  : chen.kangmin
%%%----------------------------------------------------------------------

-module(cus_api).
-author('chen.kangmin').


%% External exports
-export([
    api/0
        ]
       ).


api() ->
    Api = "<apis url=\"http://IP:5380/\">
        <api>
            <desc>增加黑名单</desc>
            <param>p={\"method\":\"add_black\",\"uid\":xxx,\"quan_id\":xxx,\"black_uid\":xxx}</param>
        </api>
        <api>
            <desc>取消黑名单</desc>
            <param>p={\"method\":\"del_black\",\"uid\":xxx,\"quan_id\":xxx,\"black_uid\":xxx}</param>
        </api>
        <api>
            <desc>关注会话</desc>
            <param>p={\"method\":\"add_follow\",\"uid\":xxx,\"cid\":xxx}</param>
        </api>
        <api>
            <desc>取消关注会话</desc>
            <param>p={\"method\":\"del_follow\",\"uid\":xxx,\"cid\":xxx}</param>
        </api>
        <api>
            <desc>置顶会话</desc>
            <param>p={\"method\":\"add_stick\",\"uid\":xxx,\"cid\":xxx}</param>
        </api>
        <api>
            <desc>取消置顶会话</desc>
            <param>p={\"method\":\"del_stick\",\"uid\":xxx,\"cid\":xxx}</param>
        </api>
        <api>
            <desc>设置会话免打扰</desc>
            <param>p={\"method\":\"add_muteNotofication\",\"uid\":xxx,\"cid\":xxx}</param>
        </api>
        <api>
            <desc>取消会话免打扰</desc>
            <param>p={\"method\":\"del_muteNotofication\",\"uid\":xxx,\"cid\":xxx}</param>
        </api>
        <api>
            <desc>设置全局免打扰</desc>
            <param>p={\"method\":\"add_global_muteNotofication\",\"uid\":xxx}</param>
        </api>
        <api>
            <desc>取消全局免打扰</desc>
            <param>p={\"method\":\"del_global_muteNotofication\",\"uid\":xxx}</param>
        </api>
        <api>
            <desc>设置推送内容拦截</desc>
            <param>p={\"method\":\"add_pushContent\",\"uid\":xxx}</param>
        </api>
        <api>
            <desc>取消推送内容拦截</desc>
            <param>p={\"method\":\"del_pushContent\",\"uid\":xxx}</param>
        </api>
        <api>
            <desc>获取系统表情包</desc>
            <param>p={\"method\":\"get_sys_emotion_packets\"}</param>
        </api>
        <api>
            <desc>获取系统表情</desc>
            <param>p={\"method\":\"get_sys_emotion\",\"packet_id\":xxx}</param>
        </api>
        <api>
            <desc>添加自定义表情</desc>
            <param>p={\"method\":\"add_user_emotion\",\"uid\":xxx,\"url\":xxx,\"jpg_url\":xxx,\"width\":xxx,\"height\":xxx}</param>
        </api>
        <api>
            <desc>删除自定义表情(多张图片逗号分割)</desc>
            <param>p={\"method\":\"del_user_emotion\",\"uid\":xxx,\"urls\":xxx}</param>
        </api>
        <api>
            <desc>获取自定义表情</desc>
            <param>p={\"method\":\"get_user_emotions\",\"uid\":xxx}</param>
        </api>
        <api>
            <desc>上传最近使用的表情（此接口建议1天调用1次）</desc>
            <param>p={\"method\":\"upload_lately_emotions\",\"uid\":xxx,\"packet\":[{\"url\":xxx,\"jpg_url\":xxx,\"emotion_type\":xxx,\"last_time\":xxx}]}</param>
        </api>
        <api>
            <desc>获取最近使用的表情</desc>
            <param>p={\"method\":\"get_lately_emotions\",\"uid\":xxx}</param>
        </api>
        <api>
            <desc>获取会话信息</desc>
            <param>p={\"method\":\"conversation_info\",\"cid\":xxx}</param>
        </api>
        <api>
            <desc>创建会话(members格式：uid逗号分割)</desc>
            <param>p={\"method\":\"create_conversation\",\"text\":xxx,\"cid\":xxx,\"name\":xxx,\"members\":xxx}</param>
        </api>
        <api>
            <desc>解散会话</desc>
            <param>p={\"method\":\"disband_conversation\",\"cid\":xxx,\"text\":xxx}</param>
        </api>
        <api>
            <desc>用户加入会话（支持添加多人）</desc>
            <param>p={\"method\":\"user_add_to_conversation\",\"cid\":xxx,\"uids\":[{\"uid\":xxx,\"text\":xxx}]}</param>
        </api>
        <api>
            <desc>用户退出会话</desc>
            <param>p={\"method\":\"user_exit_to_conversation\",\"cid\":xxx,\"uid\":xxx,\"text\":xxx}</param>
        </api>
        <api>
            <desc>变更会话名称</desc>
            <param>p={\"method\":\"change_conversation_name\",\"cid\":xxx,\"name\":xxx,\"text\":xxx}</param>
        </api>
        <api>
            <desc>获取用户token</desc>
            <param>p={\"method\":\"get_user_token\",\"uid\":xxx}</param>
        </api>
        <api>
            <desc>用户登出</desc>
            <param>p={\"method\":\"logout\",\"uid\":xxx}</param>
        </api>
        <api>
            <desc>发送测试消息</desc>
            <param>p={\"method\":\"send_test_msg\",\"uid\":xxx,\"cid\":xxx,\"name\":xxx,\"icon\":xxx,\"num\":xxx}</param>
        </api>
        <api>
            <desc>发送系统提示消息(members为空代表会话所有用户接收，如需指定一批人接收，格式:uid逗号分割)</desc>
            <param>p={\"method\":\"send_sys_prompt\",\"text\":xxx,\"cid\":xxx,\"members\":xxx}</param>
        </api>
        <api>
            <desc>获取金山云上传token</desc>
            <param>p={\"method\":\"get_k3_token\",\"sign\":xxx}</param>
        </api>
        <api>
            <desc>获取socket连接信息</desc>
            <param>p={\"method\":\"get_connect_info\"}</param>
        </api>
        <api>
            <desc>获取会话消息</desc>
            <param>p={\"method\":\"get_conversation_message\",\"cid\":xxx,\"uid\":xxx,\"mid\":xxx,\"size\":xxx}</param>
        </api>
        <api>
            <desc>推送(uids格式：uid逗号分割)</desc>
            <param>p={\"method\":\"push\",\"uids\":xxx,\"alert\":xxx,\"extra\":[{xxx:xxx},{xxx:xxx}]}</param>
        </api>
        <api>
            <desc>更新deviceToken</desc>
            <param>p={\"method\":\"update_device_token\",\"uid\":xxx,\"deviceToken\":xxx}</param>
        </api>
        <api>
            <desc>清除deviceToken对应的badge(count传0,代表重置badge为0，其他情况为badge-count)</desc>
            <param>p={\"method\":\"clear_device_token_badge\",\"deviceToken\":xxx,\"count\":xxx}</param>
        </api>
        <api>
            <desc>撤销消息，只能撤销自己发送的2分钟内的消息</desc>
            <param>p={\"method\":\"revoke_message\",\"uid\":xxx,\"mid\":xxx,\"text\":xxx}</param>
        </api>
        <api>
            <desc>聚宝盆完成消息(members为空代表会话所有用户接收，如需指定一批人接收，格式:uid逗号分割)</desc>
            <param>p={\"method\":\"cornucopia_finish\",\"cid\":xxx,\"members\":xxx,\"lotteryId\":xxx,\"text\":xxx}</param>
        </api>
    </apis>",
    unicode:characters_to_binary(Api).